import request from "./request.js";

const http = {
    get(url, params) {
        const config = {
            method: 'GET',
            url: url,
            params: params ? params : {}
        }
        return request(config)
    },
    post(url, data) {
        const config = {
            method: 'POST',
            url: url,
            data: data ? data : {},
            header: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        }
        return request(config)
    }
}

export default http